# 该镜像需要依赖的基础镜像
FROM centos
#设置jdk环境变量
ENV JAVA_HOME=/home/java/java/jdk1.8.0_144
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
# 将targer目录下的jar包复制 到 docker容器（reverse容器）目录下面/home/springboot
ADD ./target/you-0.1.jar /home/springboot/loveyou.jar
# 声明服务运行在54321端口
EXPOSE 54321
# 执行命令
CMD ["java","-Xmx128m","-Dloader.path=/home/java/dependency","-Dfile.encoding=UTF-8","-Duser.timezone=GMT+08","-jar","/home/springboot/loveyou.jar"]
# 指定维护者名称
MAINTAINER Mirror sean